<template lang="pug">
div
  span.back(v-if="back",@click="backHandler ? backHandler : $router.back()") &lt;返回
  | {{title}}
  span.button(v-if="button&&button.title",@click="button.handler&&button.handler()") {{button.title}}
</template>

<script>
export default {
  props: {
    title: String,
    back: Boolean,
    backHandler: String,
    button: Object
  }
}
</script>
<style lang="stylus" scoped>
div
  height: 0.84rem
  line-height: 0.84rem
  background: #b50909
  color: #fff
  text-align: center
  position: relative
.back
  left: 10px
  position: absolute
  cursor: pointer
  font-size: 0.26rem
.button
  right: 10px
  position: absolute
  cursor: pointer
  font-size: 0.26rem
</style>
